<template>
  <div class="header">
    <h2 class="header-h2">学生会选报系统</h2>
    <el-dropdown trigger="click" class="header-nav">
      <span class="el-dropdown-link ">
        用户名
        <i class="el-icon-arrow-down el-icon--right"></i>
      </span>
      <el-dropdown-menu slot="dropdown">
        <el-dropdown-item icon="el-icon-plus">
          <span @click="geren">个人资料</span>
        </el-dropdown-item>
        <el-dropdown-item icon="el-icon-plus">
          <span @click="xiugai">修改密码</span>
        </el-dropdown-item>
        <el-dropdown-item icon="el-icon-circle-plus">
          <span @click="zhuxiao">退出</span>
        </el-dropdown-item>
      </el-dropdown-menu>
    </el-dropdown>
  </div>
</template>

<script>
export default {
  data() {
    return {

    };
  },
  methods: {
    // 修改密码
  xiugai(){

this.$router.push("/cpassword");
  },
    geren() {
    this.$router.push("/personal");
  },
  zhuxiao() {
    sessionStorage.removeItem('token')
    this.$router.push("/login")
    
  },
  },
  
};
</script>

<style scoped>
.header-h2 {
  color: #409eff;
  display: inline-block;
  line-height: 80px;
  margin: 0;
}
.header {
  line-height: 80px;
  border-bottom: solid 1px #e6e6e6;
  width: 80%;
  height: 80px;
  position: fixed;
  top: 0;
  left: 150px;
  margin-right: 150px;
  padding: 0 30px;
}
.header-nav {
  float: right;
  font-size: 16px;
}
</style>
